import { http } from "@/utils/http";

//导入报告
export const importReport = data => {
  return http.request(
    "post",
    `/operation/api/v1/machine/po/importReport`,
    { data },
    {
      headers: {
        noLoading: true,
        "content-type": "application/x-www-form-urlencoded"
      }
    }
  );
};

//导入报告
export const updateImportReport = data => {
  return http.request(
    "post",
    `/operation/api/v1/machine/po/importReportNew`,
    { data },
    {
      headers: {
        noLoading: true,
        "content-type": "application/x-www-form-urlencoded"
      }
    }
  );
};

//PO记录明细
export const queryPoDetail = (data?: object) => {
  return http.request("post", `/operation/api/v1/machine/po/queryPoDetail`, {
    data
  });
};

//PO记录
export const queryPoRecord = (data?: object) => {
  return http.request("post", `/operation/api/v1/machine/po/queryPoRecordPage`, {
    data
  });
};

//查询条件
export const querySelectCondition = (data?: object) => {
  return http.request("post", `/operation/api/v1/machine/po/selectRecordCondition`, {
    data
  });
};

//删除记录
export const deletePoRecord = (data?: object) => {
  return http.request("post", `/operation/api/v1/machine/po/deleteRecord`, {
    data
  });
};

//出入库报表查询条件
export const querySparePartPoGroup = (data?: object) => {
  return http.request("post", `/operation/api/v1/machine/poCount/querySparePartPoGroup`, {
    data
  });
};

//出入库记录
export const querySparePartPoSummary = (data?: object) => {
  return http.request("post", `/operation/api/v1/machine/poCount/querySparePartPoSummary`, {
    data
  });
};

//出入库记录
export const querySparePartPoSummaryCount = (data?: object) => {
  return http.request("post", `/operation/api/v1/machine/poCount/querySparePartPoSummaryCount`, {
    data
  });
};
